<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title></title>
    <link rel="stylesheet" href="__PUBLIC__/Mobile/xym/css/sm.css" />
    <link rel="stylesheet" href="__PUBLIC__/Mobile/xym/css/sm-extend.css" />
</head>
<body>
<div class="page-group">
    <div id="page-layout" class="page">
        <header class="bar bar-nav">
            <a class="button button-link button-nav pull-left back" href="/demos/form">
                <span class="icon icon-left"></span>
                返回
            </a>
            <h1 class="title">我的推广方式</h1>
        </header>
        <div class="content">
            <div class="buttons-tab">
                <a href="#tab1" class="tab-link active button">推广链接</a>
                <a href="#tab2" class="tab-link button">推广二维码</a>
            </div>
            <div class="content-block">
                <div class="tabs">
                    <div id="tab1" class="tab active">
                        <div class="content-block">
                            <p>&nbsp;&nbsp;把下面的地址发给您的朋友!<br/>(注意:部分浏览器可能无法正常使用一键复制功能,请手动复制.)</p>
                            <p><a href="#" title="我的推广地址" target="_blank" ><url>{$myurl}</url></a></p>
                            <p><a href="#" id="copy-button" data-clipboard-action="copy" data-clipboard-target="url" class="btn button button-big button-round">一键复制 </a></p>
                        </div>
                    </div>
                    <div id="tab2" class="tab">
                        <div class="content-block">
                            <p>赶紧让您的朋友拿起手机使用微信扫描下方的二维码吧!</p>
                            <p><img src="__ROOT__/Public/code/{$id}.png" /></p>
                            <!--<p><a href="#" class="alert-text button button-big button-round">保存图片</a></p>-->
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-block">
                <p></p>
            </div>
        </div>
    </div>
</div>
<script src="__PUBLIC__/Mobile/xym/js/tg.js"></script>
<script type="text/javascript" src="__PUBLIC__/Mobile/xym/js/zepto.js" charset="utf-8"></script>
<script type="text/javascript" src="__PUBLIC__/Mobile/xym/js/sm.js" charset="utf-8"></script>
<script type="text/javascript" src="__PUBLIC__/Mobile/xym/js/sm-extend.js" charset="utf-8"></script>
<script type="text/javascript" src="__PUBLIC__/Mobile/js/ZeroClipboard.js"></script>
<script type="text/javascript" src="__PUBLIC__/Mobile/xym/js/clipboard.min.js" charset="utf-8"></script>
<script>
    $.init();
    $(function() {
        $(document).on('click', '.alert-text', function () {
            $.alert('被骗了吧,哈哈,这个功能没做!');
        });
    })
    //实现一键复制功能
    var clipboard = new Clipboard('.btn');
    clipboard.on('success', function(e) {
        $.alert("复制成功，请粘贴到你的QQ/微信上推荐给您的朋友");
    });
    clipboard.on('error', function(e) {
        console.log(e);
    });
</script>
<script>
</script>
</body>
</html>